CREATE OR REPLACE FUNCTION getDeleteFlag(i_parameid IN t_sysparame.parameid%TYPE)
    RETURN VARCHAR2 AS
    v_result NUMBER;
BEGIN
    SELECT paramevalue
    INTO   v_result
    FROM   t_sysparame t
    WHERE  t.parameid = i_parameid;

    RETURN v_result;

EXCEPTION
    WHEN no_data_found THEN
        dbms_output.put_line(SQLERRM);
        RETURN 1;
    WHEN OTHERS THEN
        dbms_output.put_line(SQLCODE);
        dbms_output.put_line(SQLERRM);
        RETURN 1;
END getDeleteFlag;
/
